<template>
	<view class="menu-container">
		<view class="menu-item" v-for="item in lists">
			<view class="img">
				<up-image :show-loading="true" :src="item.src" width="60px" height="60px"></up-image>
			</view>
			<view class="title">{{ item.title }}</view>
		</view>
	</view>
</template>

<script setup>
import { ref } from 'vue';

const lists = ref([
	{ id: 1, title: '粮油米面', src: 'https://img0.baidu.com/it/u=1814255610,1669028147&fm=253&fmt=auto&app=138&f=JPEG?w=577&h=500' },
	{ id: 2, title: '肉蛋禽', src: 'https://img0.baidu.com/it/u=464555754,2161258004&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500' },
	{ id: 3, title: '时令蔬菜', src: 'https://bkimg.cdn.bcebos.com/pic/4034970a304e251fe946ea30a786c9177e3e5340' },
	{ id: 4, title: '水果鲜花', src: 'https://img1.baidu.com/it/u=84112938,2307822362&fm=253&fmt=auto&app=138&f=JPEG?w=667&h=500' },
	{ id: 5, title: '水产海鲜', src: 'https://t15.baidu.com/it/u=3628877584,2540226909&fm=224&app=112&f=JPEG?w=500&h=500' },
	{ id: 6, title: '乳品烘焙', src: 'https://img0.baidu.com/it/u=3380724437,4293477881&fm=253&fmt=auto&app=138&f=JPEG?w=608&h=380' },
	{ id: 7, title: '休闲零食', src: 'https://p6.itc.cn/q_70/images01/20231225/aa2186f0593f4113ae3a6eb890732496.png' },
	{ id: 8, title: '酒水冲饮', src: 'https://img0.baidu.com/it/u=362270943,3644958235&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=5000' },
	{ id: 9, title: '美食调味', src: 'https://img0.baidu.com/it/u=2374244112,4210738407&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=1069' },
	{ id: 10, title: '日用百货', src: 'https://p8.itc.cn/q_70/images03/20231220/f779db5755fb4063bc7b226fabdc1c05.jpeg' }
]);
</script>

<style lang="scss" scoped>
view.menu-container {
	background: #fff;
	border-radius: 20upx;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	padding: 20upx;
	margin: 20upx 0;
	view.menu-item {
		width: 20%;

		view.img {
			display: flex;
			justify-content: center;
		}

		view.title {
			text-align: center;
			font-size: 28upx;
			margin: 10upx 0;
		}
	}
}
</style>
